package com.wodwl.entity;

import java.util.Date;

import org.json.JSONException;
import org.json.JSONObject;

public class Blog {
	private int bid;
	private String title;
	private String content;
	private String username;
	private int cid;//分类唯一编号
	private Date create_time=new Date();
	private int visit_count;
	private int status;
	private int read_count;//阅读次数
	private int comment_count;//评论次数
	private int favorite_count;//收藏次数
	private int top_count;//顶次数
	
	public static class CountType{
		public  final static int read_count=1;
		public  final static int comment_count=2;
		public  final static int favorite_count=3;
		public  final static int top_count=4;
	}
	
	public JSONObject toJsonObject() throws JSONException{
		JSONObject object=new JSONObject();
		object.put("bid",bid);
		object.put("title",title);
		object.put("content",content);
		object.put("username",username);
		object.put("cid",cid);
		object.put("create_time",create_time);
		object.put("visit_count",visit_count);
		object.put("read_count",read_count);
		object.put("comment_count",comment_count);
		object.put("favorite_count",favorite_count);
		object.put("top_count",top_count);
		object.put("status",status);
		return object;
	}
	
	
	
	
	
	public int getBid() {
		return bid;
	}
	public void setBid(int bid) {
		this.bid = bid;
	}
	public int getCid() {
		return cid;
	}
	public void setCid(int cid) {
		this.cid = cid;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public Date getCreate_time() {
		return create_time;
	}
	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}
	public int getVisit_count() {
		return visit_count;
	}
	public void setVisit_count(int visit_count) {
		this.visit_count = visit_count;
	}
	public int getTop_count() {
		return top_count;
	}
	public void setTop_count(int top_count) {
		this.top_count = top_count;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public int getRead_count() {
		return read_count;
	}
	public void setRead_count(int read_count) {
		this.read_count = read_count;
	}
	public int getComment_count() {
		return comment_count;
	}
	public void setComment_count(int comment_count) {
		this.comment_count = comment_count;
	}
	public int getFavorite_count() {
		return favorite_count;
	}
	public void setFavorite_count(int favorite_count) {
		this.favorite_count = favorite_count;
	}
	

}
